package com.scrx.ymg.dao.product;

import java.util.Map;

import org.springframework.web.multipart.MultipartFile;

import com.scrx.ymg.entity.AgentSuperMarketSet;
import com.scrx.ymg.entity.HeadEntrepot;
import com.scrx.ymg.entity.SuperMarketEntrepot;
import com.scrx.ymg.entity.SuperMarketInfo;
import com.scrx.ymg.entity.SupermarketSet;

public interface  IProductDao {
	
	/**
	 * 录入商品到总部仓库
	 * @param entrepot
	 * @return
	 */
	public String save(HeadEntrepot entrepot);
	
	/**
	 * 保存超市仓库商品
	 * @param superEntreot
	 * @return
	 */
	public String save(SuperMarketEntrepot superEntreot);
    
	/**
	 * 录入商品到总部仓库
	 * @param head
	 * @param file
	 * @param filePath
	 * @return
	 */
	public String save(HeadEntrepot head, MultipartFile file, String filePath,MultipartFile bigFile, String bigfilePath,
			MultipartFile detailFile,String detailFilePath);
    
	/**
	 * 判断商品条码是否唯一
	 * @param head
	 * @return
	 */
	public String whetherToRepeat(HeadEntrepot head);
	
    /**
     * 根据条件查询总部仓库
     * @param head
     * @return
     */
	public Map<Object, Object> selectByCondition(HeadEntrepot head,int pageNum,int pageCount);
	
	 /**
     * 根据条件查询超市仓库
     * @param head
     * @return
     */
	public Map<Object, Object> selectByCondition(SuperMarketEntrepot head,int pageNum,int pageCount);
	
	/**
	 * 根据商品ID查询总部仓库商品
	 * @param ID
	 * @return
	 */
	public HeadEntrepot selectHeadEntrepotByID(int ID);
	
	/**
	 * 更新超市详情设置
	 * @param sueprset
	 * @return
	 */
	public String updateSupermarketSet(SupermarketSet sueprset);
	
	/**
	 * 更新超市详情设置
	 * @param sueprset
	 * @return
	 */
	public String updateAgentSuperMarketSet(AgentSuperMarketSet sueprset,SupermarketSet set,SuperMarketInfo info);
	
	/**
	 * 更新超市详情设置
	 * @param sueprset
	 * @return
	 */
	public String updateAgentSuperMarketSet(AgentSuperMarketSet sueprset);
	
	/**
	 * 新建超市详情设置
	 * @param sueprset
	 * @return
	 */
	public String saveAgentSuperMarketSet(AgentSuperMarketSet sueprset);
	
	/**
	 * 新建超市详情设置
	 * @param sueprset
	 * @return
	 */
	public String saveSupermarketSet(SupermarketSet sueprset);
    
	/**
	 * 更新超市商品
	 * @param supermarket
	 * @return
	 */
	public String update(SuperMarketEntrepot supermarket);
	
	/**
	 * 更新总部商品
	 * @param supermarket
	 * @return
	 */
	public String update(HeadEntrepot head);
	
	/**
	 * 删除超市商品
	 * @param supermarket
	 * @return
	 */
	public String delete(SuperMarketEntrepot supermarket);
	
	/**
	 * 根据id查询超市仓库商品
	 * @param id
	 * @return
	 */
	public SuperMarketEntrepot selectByID(int id);
	
	/**
	 * 根据超市id查询超市仓库商品
	 * @param superId
	 * @return
	 */
	public SuperMarketEntrepot selectBySuperId(int superId,String barCode);
	
	
	
	/**
	 * 根据超市id查询超市设置
	 * @param superMarketID
	 * @return
	 */
	public SupermarketSet  getSupermarketSetBySuperID(int superMarketID);
	
	/**
	 * 根据超市id查询超市设置副本
	 * @param superMarketID
	 * @return
	 */
	public AgentSuperMarketSet getAgentSuperMarketSetBySuperID(int superMarketID);
    
	/**
	 * 删除商品
	 * @param oldHead
	 * @return
	 */
	public String delete(HeadEntrepot oldHead);
	
    
	/**
	 * 更新总部商品
	 * @param head
	 * @param file
	 * @param filePath
	 * @return
	 */
	public String update(HeadEntrepot head, MultipartFile file, String filePath
			,MultipartFile bigFile,String bigFilePath,MultipartFile detailFile,String detailFilePath);

}
